package com.pyk.controller;

import com.pyk.cloud_class_gitee.entity.Result;
import com.pyk.cloud_class_gitee.entity.UserAnswer;
import com.pyk.cloud_class_gitee.service.impl.AnswerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Slf4j
@RequestMapping("/Answers")
public class AnswerController {
@Autowired
    private AnswerService answerService;
@PostMapping("/save")
public  Result save(@RequestBody UserAnswer userAnswer){
    log.info(userAnswer.toString());
    answerService.save(userAnswer);
    return Result.success();
}



}
